#include "jamod_global.h"

// Legit trap calls

CDECL_FUNCTION(void, trap_ErrorX, (char *error));
CDECL_FUNCTION(void, trap_PrintfX, (char *fmt, ...));
CDECL_FUNCTION(const char *, Argv, (int n));
CDECL_FUNCTION(void, Argv2, (int n, char *buffer));
CDECL_FUNCTION(void, trap_S_StartSoundX, (vec3_t origin, int entityNum, int channel, sfxHandle_t handle));
CDECL_FUNCTION(void, trap_Cvar_VariableBufferX, ( const char *var_name, char *buffer, int bufsize ));
CDECL_FUNCTION(int, trap_FS_FOpenFileX, (char *fileName, fileHandle_t *f, fsMode_t mode) );
CDECL_FUNCTION(int, trap_FS_ReadX, ( void *buffer, int len, fileHandle_t f ));
CDECL_FUNCTION(void, trap_FS_FCloseFileX, ( fileHandle_t f ) );
FASTCALL_FUNCTION(qhandle_t, trap_R_RegisterShaderX, (char *name));
FASTCALL_FUNCTION(qhandle_t, trap_R_RegisterShaderNoMipX, (char *name));
FASTCALL_FUNCTION(sfxHandle_t, trap_S_RegisterSoundX, (char *path));


trap_ErrorX trap_Error;
trap_PrintfX trap_Printf;
trap_R_RegisterShaderX trap_R_RegisterShader;
trap_R_RegisterShaderNoMipX trap_R_RegisterShaderNoMip;
trap_S_RegisterSoundX trap_S_RegisterSound;
trap_S_StartSoundX trap_S_StartSound;
trap_Cvar_VariableBufferX trap_Cvar_VariableBuffer;
trap_FS_FOpenFileX trap_FS_FOpenFile;
trap_FS_ReadX trap_FS_Read;
trap_FS_FCloseFileX trap_FS_FCloseFile;
#ifndef NO_ARGV
Argv CG_Argv;
#endif
Argv2 CG_Argv2;